<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="<c:url value='/template/new_muban/lib/layui/css/layui.css'/>"  media="all">
  
  <!-- 轮播 -->	
<script src="<c:url value='/template/new_muban/lib/layui/layui.js'/>" charset="utf-8"></script>

  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
          
<!-- <blockquote class="layui-elem-quote layui-text">
  鉴于小伙伴的普遍反馈，先温馨提醒两个常见“问题”：1. 
</blockquote>
               -->
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend>店铺信息</legend>
</fieldset>

 
<form class="layui-form" action="">

 <div class="layui-carousel" id="test3" lay-filter="test4" style="margin-bottom: 15px;">
		  <div carousel-item style="text-align: center;" id="x-img">
		    <c:forEach items="${img_arr}" var="img_str">
				     <div><img src="${img_str}" height="100%"/></div>
				   </c:forEach>
			<%-- 	    <div><img src="${shopUserDetails.xcx_code}" height="100%"/></div> --%>
				   
		  </div>
		</div> 

  <div class="layui-form-item">
    <label class="layui-form-label">店铺名称</label>
    <div class="layui-input-block">
      <input type="text" name="title" value="${supplyDetails.shopname}" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input">
     
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">店铺LOGO</label>
    <div class="layui-input-block">
     <img class="layui-circle" width="45px" src="${supplyDetails.logo}">
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">联系人姓名</label>
      <div class="layui-input-inline">
        <input type="tel" name="phone" value="${supplyDetails.name}" lay-verify="required|phone" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">联系人姓名</label>
      <div class="layui-input-inline">
        <input type="text" name="email" value="${supplyDetails.mobile}" lay-verify="email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
   <div class="layui-form-item layui-form-text">
	   <label class="layui-form-label">关联用户</label>
	    <div class="layui-input-block">
	    <img class="layui-circle" width="45px" src="${supplyDetails.avatar}">  ${supplyDetails.username}
	  </div> 
    </div>
     <div class="layui-form-item">
    <label class="layui-form-label">一句话简介</label>
    <div class="layui-input-block">
      <input type="text" name="title" value="${supplyDetails.little_desc}" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input">
     
    </div>
  </div>
     
</form>
</body>

<script>
	layui.use(['carousel', 'form'], function(){
	  var carousel = layui.carousel
	  ,form = layui.form;
	  
	  //常规轮播
	  carousel.render({
	    elem: '#test1'
	    	,width: '100%'
	    		,height: '450px'
	    ,arrow: 'always'
	  });
	  
	  //改变下时间间隔、动画类型、高度
	  carousel.render({
	    elem: '#test2'
	    ,interval: 1800
	    ,anim: 'fade'
	    ,height: '120px'
	  });
	  
	  //设定各种参数
	  var ins3 = carousel.render({
	    elem: '#test3'
    	,width: '100%'
    	,height: '300px'
   	    ,interval: 3000
	  });
	  //图片轮播
	  carousel.render({
	    elem: '#test10'
	    ,width: '778px'
	    ,height: '440px'
	    ,interval: 5000
	  });
	  
	  //事件
	  carousel.on('change(test3)', function(res){
	    console.log(res)
	  });
	  
	  var $ = layui.$, active = {
	    set: function(othis){
	      var THIS = 'layui-bg-normal'
	      ,key = othis.data('key')
	      ,options = {};
	      
	      othis.css('background-color', '#5FB878').siblings().removeAttr('style'); 
	      options[key] = othis.data('value');
	      ins3.reload(options);
	    }
	  };
	  
	  //监听开关
	  form.on('switch(autoplay)', function(){
	    ins3.reload({
	      autoplay: this.checked
	    });
	  });
	  
	  $('.demoSet').on('keyup', function(){
	    var value = this.value
	    ,options = {};
	    if(!/^\d+$/.test(value)) return;
	    
	    options[this.name] = value;
	    ins3.reload(options);
	  });
	  
	  //其它示例
	  $('.demoTest .layui-btn').on('click', function(){
	    var othis = $(this), type = othis.data('type');
	    active[type] ? active[type].call(this, othis) : '';
	  });
	});
	
<!-- 评分 -->
layui.use(['rate'], function(){
	  var rate = layui.rate;
	//只读
	  rate.render({
	    elem: '#test9'
	    ,value: 5
	    ,readonly: true
	  });
});

<!-- layui富文本编辑器 -->
layui.use('layedit', function(){
  var layedit = layui.layedit;
  layedit.build('desc',{
	  disabled:"false",		//这里就设置contenteditable属性的值了
	  tool: []				//自定义头部bar按钮  'left', 'center', 'right', '|', 'face'
  });
});

<!-- 图片弹出层 -->
layui.use('layer', function(){
    $ = layui.jquery;//jquery
  layer = layui.layer;//弹出层

  //以上模块根据需要引入
	//轮播图弹出
    layer.ready(function(){ //为了layer.ext.js加载完毕再执行
      layer.photos({
        photos: '#x-img'
        //,shift: 5 //0-6的选择，指定弹出图片动画类型，默认随机
      });
    });
  //微信信息弹出
    layer.ready(function(){ //为了layer.ext.js加载完毕再执行
        layer.photos({
          photos: '#y-img'
          //,shift: 5 //0-6的选择，指定弹出图片动画类型，默认随机
        });
      });
  
});





</script>

</html>